package com.pgeg.registry;

import net.minecraft.item.Item;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;

import static com.pgeg.listener.ToolListener.*;
import static com.pgeg.util.Reference.MODID;

public class ToolRegistry {

    public static void registerTools() {

        /*Axes*/
        initTool("orichalcum_axe", ORICHALCUM_AXE);
        initTool("saturnium_axe", SATURNIUM_AXE);
        initTool("brimstone_axe", BRIMSTONE_AXE);
        initTool("meteorite_axe", METEORITE_AXE);
        initTool("mithril_axe", MITHRIL_AXE);
        initTool("copper_axe", COPPER_AXE);
        initTool("silver_axe", SILVER_AXE);
        initTool("sandstone_axe", SANDSTONE_AXE);
        initTool("redstone_axe",REDSTONE_AXE);

        /*Pickaxes*/
        initTool("orichalcum_pickaxe", ORICHALCUM_PICKAXE);
        initTool("saturnium_pickaxe", SATURNIUM_PICKAXE);
        initTool("brimstone_pickaxe", BRIMSTONE_PICKAXE);
        initTool("meteorite_pickaxe", METEORITE_PICKAXE);
        initTool("mithril_pickaxe", MITHRIL_PICKAXE);
        initTool("copper_pickaxe", COPPER_PICKAXE);
        initTool("silver_pickaxe", SILVER_PICKAXE);
        initTool("sandstone_pickaxe", SANDSTONE_PICKAXE);
        initTool("redstone_pickaxe",REDSTONE_PICKAXE);

        /*Shovels*/
        initTool("orichalcum_shovel", ORICHALCUM_SHOVEL);
        initTool("saturnium_shovel", SATURNIUM_SHOVEL);
        initTool("brimstone_shovel", BRIMSTONE_SHOVEL);
        initTool("meteorite_shovel", METEORITE_SHOVEL);
        initTool("mithril_shovel", MITHRIL_SHOVEL);
        initTool("copper_shovel", COPPER_SHOVEL);
        initTool("silver_shovel", SILVER_SHOVEL);
        initTool("sandstone_shovel", SANDSTONE_SHOVEL);
        initTool("redstone_shovel",REDSTONE_SHOVEL);

        /*Hoes*/
        initTool("orichalcum_hoe", ORICHALCUM_HOE);
        initTool("saturnium_hoe", SATURNIUM_HOE);
        initTool("brimstone_hoe", BRIMSTONE_HOE);
        initTool("meteorite_hoe", METEORITE_HOE);
        initTool("mithril_hoe", MITHRIL_HOE);
        initTool("copper_hoe", COPPER_HOE);
        initTool("silver_hoe", SILVER_HOE);
        initTool("sandstone_hoe", SANDSTONE_HOE);
        initTool("redstone_hoe", REDSTONE_HOE);

        /*Shears*/
        initTool("orichalcum_shears", ORICHALCUM_SHEARS);
        initTool("saturnium_shears", SATURNIUM_SHEARS);
        initTool("brimstone_shears", BRIMSTONE_SHEARS);
        initTool("meteorite_shears", METEORITE_SHEARS);
        initTool("mithril_shears", MITHRIL_SHEARS);
    }

    private static void initTool(String path, Item item) {
        Registry.register(Registry.ITEM, new Identifier(MODID, path), item);
    }
}
